home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Over 1,000 Windows 95 Programs
/
Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso
/
1257
/
payment.cp_
/
payment.cp
Wrap
Text File
|
1997-04-18
|
1KB
|
46 lines
/* EasyCODE V5.1 31.03.1995 08:21:22
Program for paying an invoice */
/* EasyCODE O
If=horizontal
LevelNumbers=no
LineNumbers=no
ScreenFont=MS Sans Serif,,80,9217,-13,0,400,0,0,0,0,0,0,1,2,1,34,120,120
PrinterFont=Courier,,100,2,-42,0,400,0,0,0,0,0,0,2,1,2,49,300,300
LastLevelId=5 */
/* EasyCODE ( 2
Program for paying an invoice */
#include <stdio.h>
extern int amount();
extern void writecheques();
/* EasyCODE F */
void main()
{
int amountofinvoice;
int cash = 0;
int maximum = 2500;
int numberofcheques;
int remainingvalue;
if ((amountofinvoice=amount()) <= cash)
{
printf ("\nCash payment !");
}
else
{
numberofcheques = amountofinvoice/maximum;
remainingvalue = amountofinvoice%maximum;
while (numberofcheques != 0)
{
writecheques(maximum);
/* EasyCODE - */
--numberofcheques;
}
if (remainingvalue>0)
{
writecheque(remainingvalue);
}
}
}
/* EasyCODE ) */